package main

import (
	"2302a/tiktok_business/api"
	"2302a/tiktok_business/config"
	"2302a/tiktok_business/inits"
	"github.com/gin-gonic/gin"
)

func main() {
	config.InitsConfig()
	inits.InitMysql()
	inits.InitRedis()
	router := gin.Default()
	router.GET("/ping", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "pong",
		})
	})
	api.LoadRouter(router)
	router.Run() // 监听并在 0.0.0.0:8080 上启动服务
}
